<html>
  <body>
   <!--
   <style type="text/css">
    .center {
      position: absolute;
      left: 50%;
      /* top: 50%; */
      -webkit-transform: translate(-50%, 0);
      transform: translate(-50%, 0);
    }
    </style>
    -->
    <div class="center" id="output"></div>
    
    <script src="qrc:/html/viz.js"></script>

    <script type="text/vnd.graphviz" id="test">
    MEOW
    </script>

    <script>

    function src(id) {
      return document.getElementById(id).innerHTML;
    }

    var format = "svg";
    var engine = "dot";

    var result = Viz(src("test"), format, engine);
    //var result = Viz(input, format, engine);
    
    if (format == "svg") {
      document.getElementById("output").innerHTML = result;
    } else {
      document.getElementById("output").innerHTML = "";
    }

    </script>
    
  </body>
</html>
